import java.util.*;

public class BallModel extends Models {
  private PVector _direction;
  private float _speed;
  private color _color;

  BallModel(int siz, PVector p, PVector direction, float speed, color c, int s) {
    super(p, s, new PVector(siz, siz, siz));
    this._direction = direction;
    this._speed = speed;
    this._color = c;
  }

  public PVector getDirection() {
    return this._direction;
  }

  public void setDirection(PVector direction) {
    this._direction = direction;
  }

  public float getSpeed() {
    return this._speed;
  }

  public void setSpeed(float speed) {
    this._speed = speed;
  }

  public color getColor() {
    return this._color;
  }

  public void setColor(color c) {
    this._color = c;
  }

  public void draw() {
    fill(_color);
    PVector posTmp = new PVector(this._pos.x + this._direction.x*this._speed, this._pos.y + this._direction.y*this._speed, this._pos.z + this._direction.z*this._speed);
    this.setPosition(posTmp);
    pushMatrix();
    translate(this._pos.x, this._pos.y, this._pos.z);
    sphere(this._size.x);
    popMatrix();
    noFill();
  }

  public void update() {
  }

  
}

